package main

import (
	"fmt"

	"github.com/spf13/viper"
)

// type Configuration struct{}

// var ViperConfig Configuration

var Viper *viper.Viper

func init() {
	runtimeViper := viper.New()
	runtimeViper.AddConfigPath(".")
	runtimeViper.SetConfigName("config")
	err := runtimeViper.ReadInConfig()
	if err != nil {
		if _, ok := err.(viper.ConfigFileNotFoundError); ok {
			// Config file not found; ignore error if desired
		} else {
			// Config file was found but another error was produced
			panic(fmt.Errorf("Fatal error config file: %s \n", err))
		}
	}
	Viper = runtimeViper
	// err = runtimeViper.Unmarshal(&ViperConfig)
	// if err != nil {
	// 	panic(err)
	// }
}
//